<extend name="Base/common"/>
<block name="header">
    <include file="Public/_nav"/>
    <link type="text/css" rel="stylesheet" href="__CSS__/wckc.css">
    <!-- <script type="text/javascript" src="__JS__/common.js"></script> -->
</block>

<block name="body">

      <!--   <include file="Public/_hot_sell"/> -->
        <!-- 左侧菜start -->
        <div class="col-xs-2">            
          <include file="Public/sidebar"  />
        </div>
        <!-- 左侧菜end -->
  <!--内容栏start-->
  <div class="col-xs-10 content"> 
    <form id="form" action="{:U('saveStudentCourse')}" method="post" class="form-horizontal">
    <div class="col-md-6">   
       <div class="center"> <h1>学生选课</h1></div>        

        <table class="table table-bordered">

        <tbody>
        <tr>
          <td>班级：</td><td>{$student.class}</td>
        </tr>
        <tr>
          <td>班内编号：</td><td>{$student.code}</td>
        </tr>
        <tr>
          <td>姓名 ： </td><td>{$student.name}</td>
        </tr>
        <tr>
          <td> 性别：</td><td> {$student.sex}</td>
        </tr>
        <tr>
          <td> <label class="item-label">请选择课程</label></td>
          <td> <div class="controls">
                 <select name="cid">
                 <option value="">不选</option>
                    <volist name="clist" id="vo">
                        
                   <if condition="($vo.cid eq $student['cid'])"> 
                      <option  selected value="{$vo.cid}">{$vo.cid}-{$vo.cname}</option>
                   <elseif condition="$vo.shengyu gt 0"/>
                      <option value="{$vo.cid}">{$vo.cid}-{$vo.cname}</option>
                   <else/>

                   </if>
                  </volist>
                  </select>
                </div> 
          </td>
        </tr>
        </tbody>
        </table>  
        </div>
        <div class="col-md-10">请选择相应年级的课程，尽量保持各课程之间人数的平衡。<span class="check-tips">
         （老师们可以查看各课程的预期人数）</span></label></div>
    
        <div class="col-md-6">
           <input type="hidden" name="sid" value="{$student.id}"/>
           <input type="hidden" name="class" value="{$student.class}"/>
            <div class="col-md-8"> <button type="submit" class="btn btn-primary" target-form="form-horizontal" onclick='submit'>确 定</button>
            <a class="btn btn-danger" href="{:U('index?class='.$student['class'])}"> 返回 </a>
            <!-- <button class="btn btn-danger" onclick="javascript:history.back(-1);return false;">返 回</button> --> </div>
            </div>
      </form>
  
 
         
         <div class="col-md-8">
          <h3>你所在的班级可选报的课程</h3>            
         <table class="table table-bordered" >
              <tr class="info">
                <th>课程ID</th><th>校本课程名称</th><th>任课教师</th><th>计划人数</th><th>已报人数</th><th>可报人数</th>
              </tr>
               <volist name="clist" id="vo">
               <tr align="center">
                <td>{$vo.cid}</td><td>{$vo.cname}</td><td>{$vo.teacher}</td><td>{$vo.number}</td><td>{$vo.count}</td>
                <td> <if condition="$vo.shengyu gt 0 ">
                {$vo.shengyu}<else/>已满</if>
                </td>
               </tr>
              </volist>
         </table>
       </div>

</block>